package student.stu23002130.chapter010;

import java.io.FileOutputStream;
import java.io.OutputStream;

public class demo10 {
    public static void main(String[] args) throws Exception {
        // 创建一个文件字节输出流，并指定输出文件名称
        OutputStream out = new FileOutputStream("D:\\java202312\\src\\student\\stu23002130\\chapter010\\stu23002130.txt");
        String str = "传智教育";
        byte[] b = str.getBytes();
        for (int i = 0; i < b.length; i++) {
            out.write(b[i]);
        }
        out.close();
    }
}
